Methods and Apparatuses for Operating a Data Processing System

ABSTRACT

Methods and apparatuses to manage working states of a data processing system. At least one embodiment of the present invention includes a data processing system with one or more sensors (e.g., physical sensors such as tachometer and thermistors, and logical sensors such as CPU load) for fine grain control of one or more components (e.g., processor, fan, hard drive, optical drive) of the system for working conditions that balance various goals (e.g., user preferences, performance, power consumption, thermal constraints, acoustic noise). In one example, the clock frequency and core voltage for a processor are actively managed to balance performance and power consumption (heat generation) without a significant latency. In one example, the speed of a cooling fan is actively managed to balance cooling effort and noise (and/or power consumption).

This application is a continuation of U.S. patent application Ser. No.15/073,521, filed on Mar. 17, 2016, which is a continuation of U.S.patent application Ser. No. 14/697,471, filed on Apr. 27, 2015, nowissued as U.S. Pat. No. 9,317,090, which is a continuation of U.S.patent application Ser. No. 13/890,694, filed on May 9, 2013, now issuedas U.S. Pat. No. 9,043,627, which is a divisional of U.S. patentapplication Ser. No. 13/550,922, filed on Jul. 17, 2012, now issued asU.S. Pat. No. 8,448,000, which is a divisional of U.S. patentapplication Ser. No. 12/267,329 filed on Nov. 7, 2008, now issued asU.S. Pat. No. 8,237,386, which is a divisional of U.S. patentapplication Ser. No. 10/917,719 filed on Aug. 12, 2004, now issued asU.S. Pat. No. 7,451,332, which is related to and claims the benefit ofthe filing date of U.S. Provisional Application No. 60/495,447, filedAug. 15, 2003, and entitled “Methods and Apparatuses for Operating aData Processing System” by the inventors Michael Culbert, Keith Cox,Brian Howard, Josh De Cesare, Rich Williams, Dave Falkenburg, DaisieHuang, and Dave Radcliffe.

FIELD OF THE TECHNOLOGY

The field of technology relates generally to data processing systems,and more particularly but not exclusively to the management of powerusage and temperature in the data processing systems.

BACKGROUND

A data processing system (e.g., a desktop computer or a laptop computer)typically contains a number of components that consume power from apower supply (e.g., battery or AC adapter) to perform different tasks.For example, a microprocessor consumes power to perform computation,generating heat in the process; and, a cooling fan consumes power todissipate heat.

Typically, a data processing system is designed for operating in a givenenvironment to deliver high computation performance. One or more fansand heat sinks are typically used to cool the system so that the dataprocessing system is not overheated in a condition of normal use.

To be energy efficient, some computers have power management systemswhich may temporarily put a hard drive or a display screen in a lowpower mode after idling for a period of time. When a component is in alow power mode, the component is not functioning at least in part (e.g.,the display screen is not displaying images, a hard drive cannot beaccessed for read or write operations, and a section of a chip is notenergized with power to perform computation). In some systems, a coolingfan is triggered by a temperature sensor such that the cooling fan isturned on when the sensor detects that the temperature is above athreshold.

To protect from overheating, some microprocessors have built-in hardwareto slow a processor when the processor is too hot. However, built-inhardware in a processor that slows down the processor when the processoris too hot is restricted to only changing processor performance toregulate the temperature. Intrinsically, it is not able to regulateother devices in the system or optimize thermal management of the entiresystem. Similarly, some computers (e.g., iBook laptops from Apple Inc.)automatically enter into a shut down when it is too hot (e.g., because afan failed). Automatic shutdown of a notebook computer is an emergencysolution for unusual situations, such as when the cooling fan isfailing. It does not regulate the temperature during the normal use ofthe computer.

Thus, a computing platform (including a processor) is commonly designedfor increased performance, which typically requires increased powerconsumption. However, computing platforms, especially in mobileapplications, are also designed to reduce power consumption such that alimited power resource (e.g., a battery) can support the computingplatform for an increased period of usage time. These design goals aretypically in conflict.

One conventional solution to the conflicting design goals is to providea means for a user to switch the configuration of the computing platformbetween a high performance mode and a power conservation mode, asdesired. For example, a computing platform may allow a user to selectthe desired mode via a hardware switch or via a menu and dialog boxdisplayed by the computing platform. For example, some computers allow auser to manually select a clock frequency for the microprocessor.

SUMMARY OF THE DESCRIPTION

Methods and apparatuses to manage working states of a data processingsystem are described here. Some of the embodiments of the presentinvention are summarized in this section.

At least one embodiment of the present invention includes a dataprocessing system with one or more sensors (e.g., physical sensors suchas tachometer and thermistors, and logical sensors such as CPU load) forfine grain control of one or more components (e.g., processor, fan, harddrive, optical drive) of the system for working conditions that balancevarious goals (e.g., user preferences, performance, power consumption,thermal constraints, acoustic noise). In one example, the clockfrequency and the core voltage for a processor are actively managed tobalance performance and power consumption (heat generation) without asignificant latency. In one example, the speed of a cooling fan isactively managed to balance cooling effort and noise (and/or powerconsumption).

Thermal managers according to embodiments of the present inventionmonitor the system temperature based on a number of sensors andconditions (e.g., sensed temperatures, lid position, battery chargingstatus, current computation tasks and user preferences) to provide thebest of mixture of cooling (e.g., by controlling one or more coolingfans) and reduced heat generation (e.g., by adjusting the working statesof the heat generating devices, such as CPU, GPU, hard drives, opticaldrives, memory chips, core logic chips and others) to provide the bestperformance for the current task.

In one aspect of the present invention, a method to operate a dataprocessing system includes: determining a control level for a firstcomponent of the data processing system based on information obtainedfrom a plurality of sensors (e.g., a temperature sensor determining atemperature in the data processing system, such as a particularcomponent's local temperature which is one of many components in thesystem); and, automatically adjusting the control of the first componentaccording to the control level to move the first component from a firstworking state to a second working state. In one example, the firstcomponent includes a cooling fan of the data processing system; and, thecooling fan runs at a first speed in the first working state and asecond speed in the second working state; and, in one example, a dutycycle of the cooling fan is adjusted to run the cooling fan from thefirst speed to the second speed. In one example, the first componentincludes a processor; the first working state includes a first clockfrequency and a first core voltage for the processor; and, the secondworking state includes a second clock frequency (which may be lower orhigher than the first clock frequency) and a second core voltage (whichmay be lower or higher than the first core voltage) for the processor.In one example, the first component includes a Graphics Processing Unit(GPU); the first working state includes a first swap interval; and, thesecond working state includes a second swap interval. In one example,the control of a second component is further adjusted automaticallybased on the information obtained from the plurality of sensors to movethe second component from a third working state to a fourth workingstate. In one example, the first component is a heat source of the dataprocessing system and the second component is a cooling source of thedata processing system. In one example, the control level is determinedfurther based on one or more user preferences. In one example, one ofthe sensors includes a software module (e.g., an operating system'skernel) determining a processor load of the data processing system.

In one aspect of the present invention, a method to operate a dataprocessing system includes: determining a subset of control settingsfrom a plurality of control settings of a plurality of components of thedata processing system based on information obtained from a plurality ofsensors (e.g., a temperature sensor, a tachometer, a software moduledetermining a load of a processor), each of which determines an aspectof a working condition of the data processing system; and adjusting thesubset of control settings to change working states of correspondingcomponents of the data processing system to balance requirements inperformance and in at least one of: thermal constraint and powerconsumption. In one example, the plurality of components include heatsources (e.g., a Central Processing Unit (CPU), a Graphics ProcessingUnit (GPU), a hard drive, an optical drive, an Integrated Circuit (IC)bridge chip) of the data processing system and cooling sources of thedata processing system. In one example, an amount of cooling change isdetermined based on the information obtained from the plurality ofsensors; and, the subset of control settings are adjusted to effect theamount of cooling change. In one example, the amount of cooling changeis determined according to a fuzzy logic; and, determining the subset ofcontrol settings includes determining a prioritized list of theplurality of control settings. In one example, the prioritized list isdetermined at least partially based on one or more user preferences. Inone example, the amount of cooling change is parceled out to the subsetof control settings. In one example, a first state of the dataprocessing system is determined from the information obtained from theplurality of sensors; and, the subset of control settings is determinedfrom a decision to move the data processing system from the first stateto a second state.

In one aspect of the present invention, a method to operate a coolingfan of a data processing system includes: adjusting the cooling fan fromrunning at a first speed to running at a second speed in response to atemperature sensor measurement and a user preference. In one example, itis further verified that the cooling fan is running at the second speed(e.g., using tachometer information obtained from a fan controller forthe cooling fan). In one example, a duty cycle of the cooling fan isadjusted to run the cooling fan from the first speed to the secondspeed. In one example, one or more temperature measurements aredetermined; and the second speed for the cooling fan is determined basedat least partially on the one or more temperature measurements. In oneexample, the one or more temperature measurements are obtained from oneor more temperature sensors instrumented in the data processing system;and, the one or more temperature measurements indicate temperatures ofat least one of: a) a microprocessor of the data processing system; b) agraphics chip of the data processing system; and c) a memory chip of thedata processing system. In one example, the microprocessor of the dataprocessing system determines the second speed. In one example, thesecond speed is determined further based on at least one of: a userpreference stored in a machine readable medium of the data processingsystem; and, a computation load level on the data processing system(e.g., the load level is low because the processor is idling and thetemperature level is low and a user preference has been set by a usersuch that in this state the fan's speed is reduced to reduce noise andpower consumption).

In one aspect of the present invention, a method to operate a processorof a data processing system includes: shifting a power supply of theprocessor from a first voltage to a second voltage without resetting theprocessor. In one example, a frequency of a clock of the data processingsystem is slewed (changed slowly) to transit a clock of the processorfrom a first frequency to a second frequency (e.g., by instructing aclock chip to use a new frequency multiplier). In one example, theprocessor continues to execute instructions while the frequency of theclock is slewed and while the power supply is shifted from the firstvoltage to the second voltage. In one example, the power supply ismaintained at one of the first and second voltages while the frequencyof the clock is slewed; and, the clock of the processor is maintained atone of the first and second frequencies while the power supply isshifted from the first voltage to the second voltage. In one example,the first frequency is higher than the second frequency; the firstvoltage is higher than the second voltage; and, the power supply isshifted from the first voltage to the second voltage after the clock ofthe processor transits from the first frequency to the second frequency.In another example, the first frequency is lower than the secondfrequency; the first voltage is lower than the second voltage; and, thepower supply is shifted from the first voltage to the second voltagebefore the clock of the processor transits from the first frequency tothe second frequency. In one example, a frequency multiplier of theprocessor is adjusted to switch a clock of the processor from a firstfrequency to a second frequency. In one example, the processor is notreset during switching from the first frequency to the second frequency.

The present invention includes apparatuses which perform these methods,including data processing systems which perform these methods, andcomputer readable media which when executed on data processing systemscause the systems to perform these methods.

Other features of the present invention will be apparent from theaccompanying drawings and from the detailed description which follows.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example and notlimitation in the figures of the accompanying drawings in which likereferences indicate similar elements.

FIG. 1 shows a block diagram example of a data processing system whichmay be used with the present invention.

FIG. 2 shows a data processing system according to one embodiment of thepresent invention.

FIG. 3 is a simplified block diagram illustrating heat sources andcooling sources of an exemplary data processing system having power andtemperature management according to one embodiment of the presentinvention.

FIG. 4 is a simplified block diagram illustrating a data processingsystem depicted partitioned into thermal zones for power and temperaturemanagement according to one embodiment of the present invention.

FIG. 5 illustrates operational states for system level power managementaccording to one embodiment of the present invention.

FIG. 6 illustrates operational states for processor and/or system powermanagement according to one embodiment of the present invention.

FIG. 7 illustrates transitions from one run state to another run stateaccording to one embodiment of the present invention.

FIG. 8 illustrates a detailed block diagram representation of a dataprocessing system with active power and temperature management accordingto one embodiment of the present invention.

FIG. 9 shows a software module diagram which shows software to managethe operation state of a data processing system according to oneembodiment of the present invention.

FIG. 10 illustrates an example of a method to determine actions to beperformed using fuzzy logic in operating a data processing systemaccording to one embodiment of the present invention.

FIGS. 11 and 12 illustrate an example defuzzification method to mergedifferent actions as one quantified action to operate a data processingsystem according to one embodiment of the present invention.

FIG. 13 shows a software module diagram which shows software to managethe operation state of a data processing system according to oneembodiment of the present invention.

FIGS. 14-16 show methods to operate a data processing system accordingto embodiments of the present invention.

FIG. 17 illustrates a method to parcel out cooling changes to a numberof controls according to one embodiment of the present invention.

FIG. 18 illustrates an example of a state diagram which shows a way tooperate a data processing system according to one embodiment of thepresent invention.

DETAILED DESCRIPTION

The following description and drawings are illustrative of the inventionand are not to be construed as limiting the invention. Numerous specificdetails are described to provide a thorough understanding of the presentinvention. However, in certain instances, well known or conventionaldetails are not described in order to avoid obscuring the description ofthe present invention. References to one or an embodiment in the presentdisclosure are not necessarily references to the same embodiment; and,such references mean at least one.

As the performance of data processing systems continues to increase, sodo power and cooling requirements. A fan and heat sink may not beadequate for such high performance data processing systems. To meet thechallenge of combined conflicting design goals (e.g., computationperformance, power usage, cooling, acoustic noise, and others), at leastone embodiment of the present invention seeks to manage the workingstates of various components of a data processing system according tosensed information (e.g., one or more temperature sensors andperformance sensors and fan speed sensors). Since hardware-basedsolutions have pre-determined flexibility, at least one embodiment ofthe present invention utilizes the processing power of the dataprocessing system to provide software-based management solutions (e.g.,software in a kernel of an operating system).

In the present document, a working state of a component (e.g., amicroprocessor or a fan) is a state in which the component works toprovides the functionality of the component at a specific level of cost(e.g., the consumption of power usage, the generation of noise or heat,or other factors). A working state does not normally include the statein which the component does not work to provide its functionality forthe system.

One embodiment of the present invention involves power and thermalmanagement strategies to meet the combined challenge of highperformance, low power consumption, low noise and tight thermalconstraints. In one embodiment, power and temperature in a computer areactively managed so that the computer can go faster, run quieter withextended battery life, and avoid running too hot, as the computationspeeds increase and the enclosures of computers continue to push thelimits of engineering.

In one embodiment of the present invention, a computer system isinstrumented with one or more sensors; and, at least one component ofthe system has a number of different working states. For example,different working states have different power consumption levels andperformance levels (e.g., processor speeds measured in megahertz orprocessing operations per second, etc.), which are actively managed tomeet conflicting goals, such as high performance and low powerconsumption, subject to thermal constraints (e.g., the interior of thecomputer enclosure should not or cannot exceed a certain temperaturewhich may damage certain components in the enclosure). Managing thermaloutput and finessing cooling efforts can help some machines avoid theneed for fans, while allowing other machines to run fans more quietly.With the help of the information collected from the sensors, thecomputation performance, user preferences and environmental requirementscan be balanced to reach a best mix for a particular usage of thesystem.

In one embodiment of the present invention, sensors are instrumented(e.g., in the hot spots for measuring temperature); controls areconstructed to gracefully adjust the working states (e.g., through theadjustment of frequencies and voltages) for tradeoff in performance,power consumption, heat generation and heat removal; and, a thermalmanager is provided to monitor and control one or more thermal zones,according to the constraints of system and user preferences, whichdefine the priorities of conflicting goals.

In one embodiment of the present invention, temperature sensors areinstrumented so that the temperatures of hot spots can be periodicallypolled. The temperature sensors can be implemented as thermal diodes onIntegrated Circuit (IC) chips (e.g., microprocessors, graphics chips,microcontrollers, and others). Further, tachometers are instrumented toobtain the feedback about the working states of fans.

In one embodiment of the present invention, fine-grained control offrequencies and voltages for a data processing system is added in anarchitecture-independent way to manage power consumption and heatgeneration. For example, Central Processing Unit (CPU) voltage andfrequency control are provided to allow multiple CPU frequency andvoltage states with fine-grained control beyond just high or low; andcooling fans have speed control beyond just on or off.

In one embodiment of the present invention, software device driversdynamically tweak power and performance. For example, a CPU softwaredriver manages CPU working states (e.g., speed, frequency, voltage)based on computation load, sensor measurements (e.g., CPU temperaturesand CPU load levels), and various preferences and priorities (e.g., userpreferences with respect to fan noise or other noise or battery life).Device drivers for other controls use a similar approach to select theworking state based on the required work load and various constraints.

In one embodiment of the present invention, a thermal manager softwaremodule controls the power consumption level of various componentsthrough the software device drivers. For example, the software thermalmanager may monitor and control physical (e.g. temperature) and logical(e.g. CPU load) sensors, optimize for user-center or design-centerpriorities, such as performance, heat, battery life, and noise, forcedrivers into lower power states to minimize power consumption and/orheat production, and remove heat with minimal noise. Further, thethermal manager may monitor and control multiple independent zones.

It is vastly cheaper to reject a faulty part during a factory burn inprocess (before a customer receives the part) than to handle a customerreturn. After a design is instrumented, bad parts can be detected earlyduring the manufacture of or testing of the system, using diagnosticstools. For example, when a computer is instrumented with temperaturesensors, misapplied heatsinks may be detected for correction, removingone of the most costly manufacturing defects.

Many of the methods of the present invention may be performed with adigital processing system, such as a conventional, general-purposecomputer system. Special purpose computers, which are designed orprogrammed to perform only one function, may also be used.

FIG. 1 shows one example of a typical computer system which may be usedwith the present invention. Note that while FIG. 1 illustrates variouscomponents of a computer system, it is not intended to represent anyparticular architecture or manner of interconnecting the components assuch details are not germane to the present invention. It will also beappreciated that network computers and other data processing systemswhich have fewer components or perhaps more components may also be usedwith the present invention. The computer system of FIG. 1 may, forexample, be a Macintosh computer from Apple Inc.

As shown in FIG. 1, the computer system 101, which is a form of a dataprocessing system, includes a bus 102 which is coupled to amicroprocessor 103 and a ROM 107 and volatile RAM 105 and a non-volatilememory 106. The microprocessor 103, which may be, for example, a G3 orG4 microprocessor from Motorola, Inc. or IBM or a G5 microprocessor fromIBM is coupled to cache memory 104 as shown in the example of FIG. 1.The bus 102 interconnects these various components together and alsointerconnects these components 103, 107, 105, and 106 to a displaycontroller and display device 108 and to peripheral devices such asinput/output (I/O) devices which may be mice, keyboards, modems, networkinterfaces, printers, scanners, video cameras and other devices whichare well known in the art. Typically, the input/output devices 110 arecoupled to the system through input/output controllers 109. The volatileRAM 105 is typically implemented as dynamic RAM (DRAM) which requirespower continually in order to refresh or maintain the data in thememory. The non-volatile memory 106 is typically a magnetic hard driveor a magnetic optical drive or an optical drive or a DVD RAM or othertype of memory systems which maintain data even after power is removedfrom the system. Typically, the non-volatile memory will also be arandom access memory although this is not required. While FIG. 1 showsthat the non-volatile memory is a local device coupled directly to therest of the components in the data processing system, it will beappreciated that the present invention may utilize a non-volatile memorywhich is remote from the system, such as a network storage device whichis coupled to the data processing system through a network interfacesuch as a modem or Ethernet interface. The bus 102 may include one ormore buses connected to each other through various bridges, controllersand/or adapters as is well known in the art. In one embodiment the I/Ocontroller 109 includes a USB (Universal Serial Bus) adapter forcontrolling USB peripherals, and/or an IEEE-1394 bus adapter forcontrolling IEEE-1394 peripherals.

Sensors 112 are coupled to controller 109 to provide information aboutthe operating environment condition of the components of the dataprocessing system. For example, sensors 112 may include temperaturesensors for determining the temperatures at a plurality of locations inthe data processing system, such as the temperatures of microprocessor103, volatile RAM 104, a hard drive and an optical (e.g., CD/DVD) drive;sensors 112 may further include a fan tachometer for determining thespeed of a cooling fan, a light sensor for determining the amount ofrequired backlight; a sensor to determine whether a display of a laptopis opened or closed and others. Although FIG. 1 illustrates aconfiguration in which sensors 112 are coupled to controller 109, it isunderstood that sensors may also be integrated into components (e.g.,microprocessor 103). Further, software sensors like kernel load factorare also used in at least some embodiments of the present invention.

It will be apparent from this description that aspects of the presentinvention may be embodied, at least in part, in software. That is, thetechniques may be carried out in a computer system or other dataprocessing system in response to its processor, such as amicroprocessor, executing sequences of instructions contained in amemory, such as ROM 107, volatile RAM 105, non-volatile memory 106,cache 104 or a remote storage device or a combination of memory devices.In various embodiments, hardwired circuitry may be used in combinationwith software instructions to implement the present invention. Thus, thetechniques are not limited to any specific combination of hardwarecircuitry and software nor to any particular source for the instructionsexecuted by the data processing system. In addition, throughout thisdescription, various functions and operations are described as beingperformed by or caused by software code to simplify description.However, those skilled in the art will recognize what is meant by suchexpressions is that the functions result from execution of the code by aprocessor, such as the microprocessor 103.

A machine readable medium can be used to store software and data whichwhen executed by a data processing system causes the system to performvarious methods of the present invention. This executable software anddata may be stored in various places including for example ROM 107,volatile RAM 105, non-volatile memory 106 and/or cache 104 as shown inFIG. 1. Portions of this software and/or data may be stored in any oneor more of these storage devices.

Thus, a machine readable medium includes any mechanism that provides(i.e., stores and/or transmits) information in a form accessible by amachine (e.g., a computer, network device, personal digital assistant,manufacturing tool, any device with a set of one or more processors,etc.). For example, a machine readable medium includesrecordable/non-recordable media (e.g., read only memory (ROM); randomaccess memory (RAM); magnetic disk storage media; optical storage media;flash memory devices; etc.), as well as electrical, optical, acousticalor other forms of propagated signals (e.g., carrier waves, infraredsignals, digital signals, etc.); etc.

FIG. 2 shows a data processing system according to one embodiment of thepresent invention. In FIG. 2, the data processing system includes one ormore processors 201 (e.g., a Graphics Processing Unit (GPU) and one ormore Central Processing Units (CPU)), devices 221-229 (e.g., coolingfan, battery charging system, AC adapter) and machine readable media 209(e.g., RAM chips, ROM chips, hard drive, optical drive). The dataprocessing system may include communication links to one or more devicesoutside housing 200. For example, the data processing system may beconnected to a network or peripheral devices (221), such as a monitor, akeyboard, a cursor controlling device (e.g., mouse, a track ball, or atouch screen, or a touch pad), a printer, a storage device, or others.Although FIG. 2 shows that machine readable media 209 are inside housing200, it is understood that a portion of the machine readable media maybe outside housing 200 (e.g., connected through an IEEE 1394 bus or aUSB bus, or a network connection). Further, some of the peripheraldevices listed above as examples of devices 221 may be integrated insidehousing 200. For example, a touch pad, an LCD display panel and akeyboard can be integrated within housing 200 (e.g., on a notebookcomputer).

Machine readable media 209 have program instructions and data foroperating system 233 (e.g., Mac OS X), application programs 231 (e.g., aword processing program), and operating manager 235 for managing thestates of the components of the system. Note that operating manager 235can be a part of operating system 233. Sensors 211-219 are instrumentedwithin housing 200 of the data processing system to obtain informationabout the environmental conditions of various components of the dataprocessing system, such as the temperature of the processors (201), thefan speed of a cooling fan, the lid position (e.g., open or closed).Some of the sensors can also be software modules that determine thecomputation loads for the processors. Operating manager 235, whenexecuted on at least one of the processors (201), causes the processingof the information obtained from sensors 211-219 and the adjustment ofthe working states of the processors (201) and the devices (e.g.,221-229) to provide trade-off between performance and power usage whilemaintain proper thermal constraints to avoid damage or loss of data.

Because software can crash, a safety thermal cutoff remains independentof the operating system and is tied directly to Power Management Unit(PMU 205) which includes a hardware only portion which is not effectedby a software crash. When a sensor (e.g., 207) detects a temperaturethat exceeds a safety threshold, hardware-based safety trigger 203signals PMU for proper action. PMU 205 may force a shutdown of the dataprocessing system to prevent damage when an extreme thermal condition isdetected. PMU 205 notifies processors 201 about the safety threshold;and, a software module may then notify the user that the safetythreshold is being approached, if one of processors 201 is responsive toPMU. If none of processors 201 is responding to the safety alert or ifits response is inadequate to reduce the temperature, PMU 205 takesactions to power off the data processing system. Note that sensor 207may be different and separate from sensors 211-219; alternatively,sensor 207 may be part of sensors 211-219 as shared hardware.

FIG. 3 is a simplified block diagram illustrating heat sources andcooling sources of an exemplary data processing system having power andtemperature management according to one embodiment of the presentinvention. In FIG. 3, data processing system 300 has power andtemperature management according to one embodiment of the presentinvention. System 300 includes power manager 301 (e.g., a softwareprogram running as a portion of the operating system on data processingsystem 300), heat sources 311-317 (e.g., Central Processing Unit (CPU),Graphics Processing Unit (GPU), memory chips, hard drive, optical drive,backlight, battery charging system, system core logic and others) andcooling sources 321-324 (e.g., cooling fans, heat pipes and heat sinks)located within housing 200 of the data processing system. The dataprocessing system is instrumented with sensors 331-335 (e.g.,temperature sensors, tachometers, light sensors, noise sensor andothers) within housing 200.

In one embodiment of the present invention, power manager 301 isphysically and/or logically coupled to heat sources 311-317, coolingsources 321-324 and sensors 331-335. For example, power manager 301 canbe partially a software program running on the data processing system,using the processing power and storage capacities provided by the heatsources, and partially hardware providing control signals to the heatingsources and cooling sources to balance the performance and powerconsumption and limit the temperatures monitored by the sensors. Some ofsensors 331-335 may be disposed proximate to some of heat sources311-317, with some of cooling sources 321-324 being disposed so as tooperatively couple to the heat sources to remove heat from the heatsources.

FIG. 4 is a simplified block diagram illustrating a data processingsystem depicted partitioned into thermal zones for power and temperaturemanagement according to one embodiment of the present invention. In FIG.4, the data processing system is thermally divided into a plurality ofzones (e.g., zones 401-404). The temperature of these thermal zones canbe individually controlled via controls (e.g., CPU controller, fancontroller, hard drive controller) to the heat sources and coolingsources disposed within each thermal zone using the information from thesensors in the corresponding zone.

In one embodiment of the present invention, the data processing systemis enclosed within multiple isolated thermal zones (MITZ). In thepresent application, a thermal zone is a volume of space containingcomponents that have strong thermal interaction. For example, in athermal zone, the heat from one device may raise significantly thetemperature of another; the devices may share a common cooling system ora common temperature sensor. One or more temperatures within one zoneare sensed for thermal management in that zone.

It is possible that one zone in a system requires software management,and another does not. For example, a power supply could control a fan ina first zone, with the CPU and another fan in a second zone. In thisexample, cooling the power supply may very well cool the rest of thezone adequately (perhaps even over-cooling some components). Since powerconsumption relates to heat in the power supply, it might be possiblethat meeting the cooling requirements of the power supply is guaranteedto cool all other devices in its thermal zone. In this case, the powersupply zone would require no active management. At the same time, theCPU zone would need sensors and active thermal management.

FIG. 5 illustrates operational states for system level power managementaccording to one embodiment of the present invention. There are fourbasic states in the system level power state diagram. These states areOff 507, Run 501, Idle 509 and Sleep 503. Run 501 includes a range ofworking states with different power and performance levels.

Off 507 represents a state when all power plane for the system is turnedoff, with the exception of those power planes necessary to run the powersystem (and one or more peripherals that can be operated in anautonomous mode).

Idle 509 represents a state when the system is idling. Cache coherencyis maintained when in Idle 509. All clocks are running and the systemcan return to running code within a few nanoseconds. When all CPUs stopcomputing, the system enters (519) from Run 501 into Idle 509, such aswhen the last active processor of the system is stopped in the Nap state603 and is dynamically switched between the Nap state 603 and the Dozestate 607 for snoop cycles to complete. The North Bridge can control theswitching between the Nap state 603 and the Doze state 607, which willbe described below with FIG. 6 in detail. Any processor interruptreturns (519) the system from Idle 509 to Run 501.

Sleep 503 represents a state when the system is shutdown with variousstates preserved for instance recovery (513) to Run 501. In oneembodiment, the states of the North Bridge, RAM and South Bridge arepreserved to provide the appearance of instant-on/always-available. Allprocessors are powered off after their caches are flushed and theirstates preserved in RAM for the system to enter (513) from Run 501 intoSleep 503. Other devices, such as the devices in PCI slots (or PCMCIAslots) are also powered off after preserving their state in RAM. Allclocks in the system are stopped except for the one for real-time clockfunction.

Run 501 represents a state when a least one processor of the system isrunning. If the system has multiple processors, the individualprocessors may move in and out of their respective processor powerstates (e.g., Doze 607, Nap 603, Sleep 605, Off 609 in FIG. 6) in afully independent manner. While in Run 501 state, the processors canmove together between different performance levels. The operating systemsets the policies for when to shift performance levels and when to powermanage individual CPUs. For example, if there are threads waiting to bescheduled, the system is in Run 501 state and at least one CPU isrunning and executing the threads. When the scheduler of the operatingsystem runs out of threads, the system transitions from Run 501 to Idle509.

There are multiple power and performance levels associated with Run 501,in which the system moves (511) among them as load and other constraintsdictate. In one embodiment of the present invention, the processorcontinues executing instructions while shifting in performance levels,remaining in Run 501 but shifting between different working states withdifferent power consumption levels and performance levels. For example,when more performance is needed, the CPU voltage and frequency may beincreased to trade increased power consumption for high performance.When full performance is not needed and/or cooling down is required, theCPU voltage and frequency may be decreased to trade performance forreduction in power consumption, which helps cooling the processor(s)down.

In one embodiment of the present invention, a device is placed into aworking state that uses as only much power as is required to perform atask. The power consumption for a device is scaled to match the workbeing requested. For example, the speed of a fan is adjusted to keep thetemperature within the allowable range while using less power andproducing less noise than when the fan is at the full speed. The fan iscontrolled to run only as fast as it needs to, and no faster. Sensorsinstrumented in the system are used to gather the information; and, thedata processing system processes the information to decide how tocontrol the devices.

In a given system implementation, there are different devices (e.g.,CPU, hard drive, optical drive, graphics chip, power supply, memorychip, core logic) that may reach their thermal maximums (maximum thermalthresholds). If a device may be above its allowable temperature (tobecome overheated) under certain operating condition, the device may beincluded in a thermal management algorithm; and, a temperature sensorcan be instrumented for detecting the current temperature of the device.If the enclosure and airflow somehow guarantees that a device will staywithin its specifications (including noise), temperature sensing of thatdevice is not required; and, that device may be included only for powermanagement.

There also might be a case where the temperature of one device is sensedindirectly via its effect on another device. For example, a design mighthave the hard drives preheating the air that flows over the CPU. If thealgorithm for protecting the CPU always turns on the fan before the harddrives overheat, it is not necessary to sense hard drive temperaturedirectly.

In one embodiment of the present invention, device management includesusing sensors for the devices and implementing software drivers thatcontrols the operations of the devices according to the work beingrequested. In one embodiment, sensors include thermistors, hard drivetemperatures, kernel loads, and more. Controls are provided to vary fanspeeds, backlight brightness, hard drive speeds, to power devices off,to put a CPU in a different working state, and to throttle threadscheduling.

Many of the devices of a computer (e.g., CPUs, GPU, hard drives, opticaldrives, backlight, charging system, etc.) have multiple power states,which can be used for active power management, such as varying spindlespeed of hard drives.

FIG. 6 illustrates operational states for processor and/or system powermanagement according to one embodiment of the present invention. In theRun state 601, all processor units are active. Dynamic clock stopping toindividual functional units is allowed, but are invisible to software.Clocks are automatically restored to functional units immediately upondetection of any instruction to be dispatched for that functional unit.

In the Doze state 607, all execution units are stopped. All processorcaches and bus interface logic necessary to maintain cache coherency areactive.

In the Nap state 603, all execution units are stopped, along with allcaches and bus interface logic. The system can bring (621) the processorback to the Doze state 607 by de-asserting a signal (e.g., QAck). Thisis done when the system needs the processor to perform cache coherencyoperations.

In the Sleep state 605, all execution units are stopped, while theprocessor state is maintained. Before entering (619) the Sleep state605, all processor caches are flushed, as a sleeping processor does notperform any cache coherence operation. In systems with multi-drop bustopologies (60x, MaxBus), sleeping processors do not respond todeassertion (e.g., QAck). Systems with point-to-point interconnecttopologies (e.g., ApplePI) uses per-processor deassertion signals, butnot to a sleeping processor.

In the Off state 609, core power is removed from the processor. The Offstate 609 is typically used in multiprocessor systems. In oneembodiment, before a processor enters the Power Off state, it sets itsPowerDownEnabled bit inside the core logic. Once the core logic assertsdeassertion signal (e.g., QAck) to put a processor into the Sleep state605, the core logic checks the PowerDownEnabled bit. If the bit is set,the processor interface is then put into an appropriate condition forpowering down the processor. An interrupt is generated to signal thesystem that the processor is ready to have its power removed. A liveprocessor receives the interrupt and performs the appropriate actions toremove power from the sleeping CPU, moving (615) it into the Off state609.

When software determines that it again needs the processor that is inthe Off state 609, it performs the appropriate actions to reapply powerto the CPU and reset it, returning (613) it to the Run state 601.

In a single processor system, the CPU may avoid the Sleep state 605 andtarget the Nap state 607 to avoid the penalty associated with cacheflushing. In a multi-processor system, every processor except the lastactive processor uses either the Doze state 607 or the Sleep state 605.These two states impose no penalty for performing snoop operations. Thelast active processor will use Nap 607 in a manner similar to the singleprocessor. The system enters the Idle state 509 when the last active (orthe only) processor enters the Nap state 603.

One embodiment of the present invention moves the processor fromperformance level to performance level by changing frequency and powervoltage while staying within the Run state 601. Each performance levelis a different combination of CPU core frequency, CPU bus frequency, andCPU core voltage that defines both a computing performance level and apower consumption level. Each performance level representing a workingstate of the CPU.

The number of performance levels implemented in a system depends upon avariety of factors. For example, some CPUs may only support twooperating points, limiting the system implementation to Run 0 and Run 1.A well-managed portable design may implement Run 0 for minimum power,Run 1 for specific functionality level such as DVD playback, and Run 2for the clock frequency for the portable system. A high performancedesktop may implement Run 0 for power and thermal savings, Run 1 at 90%of maximum clock frequency for most operations, and Run 2 at maximumpower. One example of different performance levels is illustrated below.

Run 0: This is the lowest power and performance level supported by thesystem. The processor's Doze mode entered from Run 0 may be differentthan that used at the other performance levels. In particular, a largeportion of the CPU may be powered at a lower voltage than that requiredby the snoop logic, saving significant leakage power. Run 0 can be thestate at which the system starts executing code after a Power-On orRestart event.

Run 1 . . . n: These states have incremental power and performancelevels above the next lower level one. These states differ solely by CPUcore voltage and frequency, which sets leakage power, operating powerand CPU performance.

Run n+1: This state is special in requiring no transitions out of thisstate. Some systems may achieve higher performance if the CPU does notleave the Run state 601. Since the surge currents for transition in andout of Run can be significant, transitions can cause the maximum droopon the power supply rail. By avoiding these droops at the highestperformance point, the maximum performance can be achieved. However, bynot allowing the CPU to Nap (603) or Sleep (605), significant additionalpower will be used.

In one embodiment, with the processor environment set to a specificperformance level, the processors can independently transition back andforth between their different power saving states (Run 601, Doze 607,Nap 603, Sleep 605, and Off 609). The system enters automatically fromRun 501 into Idle 509 whenever there are no processors in the Run state601.

Some operating systems (e.g., Mac OS X) have the capabilities formonitoring the activity level of the CPU(s). In one embodiment, afterdetermining the processing load currently required by the CPU, the CPUcan determine if it is above a certain activity level. Based on theprocessing load level, the management system can initiate a shift upwardor downward in performance.

Likewise, if the CPU determines that it doesn't need all the performancethat is currently available, it can shift downward in performance inorder to save significant power. Since the CPU continues to operatethroughout the process of shifting, no significant latency is incurredas a result of the performance level change.

In one embodiment, the algorithms used to determine when to shift up anddown in performance are contained in system software. The software makesthe decisions about when to change the performance level. In oneembodiment of the present invention, the software relies not only on CPUload, but also on system thermal conditions, user preferences andothers, to decide whether to move to a higher or lower performancelevel.

In one embodiment of the present invention, the CPU continues executinginstructions throughout the performance transition process without CPUreset.

FIG. 7 illustrates transitions from one run state to another run stateaccording to one embodiment of the present invention. In one embodimentof the present invention, the transitions between the different CPU runlevels are accomplished using a combination of frequency and voltagecontrol. To increase performance (e.g., to move from Run 707 to Run705), the CPU core voltage is first increased (701) to the levelappropriate for Run 705. The CPU power supply moves the voltage betweenthe two voltage points at a rate slow enough such that it does notinduce errors in the running CPU. When the voltage transition iscomplete, the CPU is currently operating at point 709 in FIG. 7; and,the CPU power supply may signal the system with an interrupt, indicatingthat it is now safe to increase frequency. At this point, the clocksource starts to transition to the new (faster) operating frequency. Theclock source slews (slowly changing) the frequency between the twooperating points (e.g., 709 and 705) slow enough such that all the PhaseLock Loops (PLL) in the system can track the clock without causingerrors in the running system.

Similarly, to decrease performance (e.g., to move from Run 705 to Run707), the clock source is first instructed to move to the new (slower)operating frequency. The clock source again slews the frequency betweenthe two operating points slow enough such that all the PLLs in thesystem can track the clock without causing errors in the running system.

Since the operation of slewing the frequency from point 705 to 709 takesa deterministic amount of time, it is possible to have the CPU wait theappropriate delay and then infer that it is operating at point 709.Alternatively, the clock chip can generate an interrupt after achievingthe new frequency.

Once point 709 is reached, the CPU core voltage is decreased to thelevel appropriate for Run 707. The CPU power supply moves the voltagebetween the two voltage points at a rate slow enough such that it doesnot induce errors in the running CPU. Since no further action needs tobe taken, the voltage transition may be left to complete unmonitored.

In a typical system, the different PLLs in the system have certaininter-relationships. For example, each PLL associated with the CPU mayrun at a frequency derived from a single, common reference clock. Eachof these PLLs also has its own specified minimum and maximum operatingfrequencies. The individual PLL operating minimum and maximumfrequencies imply that each PLL also has a specific minimum and maximumreference frequency that it will accept. In order for the system to workcorrectly, the reference clock must obey all the individual referenceclock minima and maxima. In some cases, the PLL of a device (e.g., corelogic) may be reprogrammed during the frequency transition operation toobey the clock minima and maxima of the device.

FIG. 8 illustrates a detailed block diagram representation of a dataprocessing system with active power and temperature management accordingto one embodiment of the present invention. In FIG. 8, the dataprocessing system contains system core logic 801 (North Bridge), whichinterconnects CPU 805 and RAM 809. I/O controller 803 (South Bridge)connects core logic 801 with hard drive 811 and optical drive 813 (e.g.,CD ROM, DVD ROM, CD R, CD RW, DVD R, or DVD RW) and other I/O devices(e.g., a keyboard, a cursor control device, or others, not shown in FIG.8). Some components (e.g., CPU 805, GPU 807 and RAM 809) may haveelevated temperature after generating significant amount of heat duringoperation. Some components (e.g., hard drive 811 and optical drive 813)consume more power at a high speed and less power at a lower speed. Heatpipe 825 moves heat from one location to anther to transfer heat; heatsink 823 absorbs heat to regulate temperature; and, under the control offan controller 845, variable speed fans 819 and 821 can work atdifferent speeds for tradeoff between the rate of cooling and theassociated cost (e.g., noise and power consumption). Sensors 831 and 833monitor the temperate of GPU 807 and CPU 805 for active management ofthe system according to embodiments of the present invention.

FIG. 8 shows a particular configuration for the illustration purpose. Itis understood that different configurations can also be used withvarious methods of the present invention.

In one embodiment, CPU power 843 is controllable to move the corevoltage of CPU 805 from one point to another for the shifting of powerconsumption level (e.g., along path 701 in FIG. 7); and, clock source841 is controllable to slew the core frequency of CPU 805 from one pointto another for the shifting of performance level (e.g., along path 703in FIG. 7). When the CPU is working at a lower frequency, the CPUvoltage is reduced to save power and reduce heat generation.

In FIG. 8, sensor 831 measures the temperature of GPU 807; thus, GPU 807and sensors 831 are in thermal zone 853. CPU 805, fan 819 and sensor 833are thermally coupled in thermal zone 851. Fan 821 may cools power unit817 and other components sufficiently such that other components may notneed active thermal management.

Although the software-based thermal and power management can manage theoperations of the system according to combined goals to achieve a bestmix, software may crash. Thus, a hardware-based failsafe mechanism isused in one embodiment of the present invention as a backup. Forexample, sensor 835 may trigger a safety alert when a safety thresholdfor temperature is reached or exceeded. Note that sensor 835 may bereplaced by an output from sensor 833 or 831. Alternatively, sensor 835may be a circuit which combines the output of sensors 831 and 833 forsafety trigger. In one embodiment of the present invention, thetemperature sensors can trigger operations (e.g., force the fan to runat the full speed or a shutdown of the system) to prevent thermalrunaway (overheating to cause damage), when the temperature is above athreshold. In one embodiment, the sensor sends a signal to the powermanagement unit (PMU 815) when this happens; and, PMU 815 controls powerunit 817 for emergency powering off to prevent permanent damage.

In one embodiment of the present invention, software (e.g., a part ofthe operating system) has the responsibility for keeping all componentswithin their respective thermal specification. The hardware failsafe isintended to prevent a crashed system from destroying itself. As such,the failsafe threshold may be set above a device's maximum operatingtemperature, as long as it is still below the threshold above whichpermanent damage may occur.

In one embodiment, PMU 815 implements a forced system shutdown function.When a hardware failsafe trips (e.g., by sensor 835), PMU 815 tries todetermine if the CPU is active. One method of determining if the CPU isdead is to use a watchdog timer (e.g., in KeyLargo/K2) to determinewhether the CPU response to a signal within a specified time period setfor the timer. If the CPU is dead (e.g., not responding to the signalbefore the timer expires) after the failsafe has tripped, PMU 815 shutsoff power to the system.

In one embodiment, when the failsafe triggers, the information about thefailsafe shutdown is recorded so that a user can find out about theevent at the next boot of the system. If a machine refuses to bootbecause it detects a misapplied heatsink, the LED emits a code to conveythe nature of the failure. Further, when the system cannot besufficiently cooled, and devices are set to slower operating speeds, theuser might be informed that the system's performance is sufferingbecause of the heat.

Heatsinks (e.g., 823) generally provides a valuable time to respond tonon-responsive systems. Conversely, misapplied heatsinks can lead todestruction of a CPU in mere seconds. In one embodiment, during boottime, PMU 815 has a thermal trip watchdog timer that shuts off anon-responsive system with a time period before an unsinked device meltsdown.

In one embodiment of the present invention, the boot ROM code sets thethermal trip points in the thermal sensors for devices that mightsustain permanent damage if over a critical temperature for more than afew seconds (e.g. CPUs).

In one embodiment of the present invention, software manages a thermalzone (e.g., 851) by controlling one or more fans (e.g., fan 819 or other“cooling” devices, such as CPU 805 for reduced heat generation) in thatzone. The fan control is in the form of speed control, and not simple onor off operations. For example, a signal is sent to control the fanspeed by varying duty cycle.

In addition to telling the fan how fast to spin, the software detectswhether or not the fan has responded to reliably manage the thermalzone. For example, the software can used the tachometer input from fancontrollers to obtain this feedback.

In one embodiment of the present invention, the tachometer feedback isto ensure that the fan begins spinning when first turned on. Fans mayrun at speeds slower than those required for spin-up. Some fancontrollers start the fan at full speed and then backs off. In oneembodiment, a better algorithm for spinning up a fan is to slowlyincrease the duty cycle until the fan starts up, and then slowly back itdown to the actual desired fan speed (if slower than the startup speed).Tachometer feedback can be used to implement this algorithm.

In one embodiment of the present invention, a fan is controlled by a fancurve, which describes the relationship between the temperature valuesof one or more temperature sensors and the speed of the fan. Forexample, one fan curve specifies that for a given temperature the fan isto run a given speed. In one embodiment, there is one fan curve to mapeach sensor to each fan for a given performance level; thus, the totalnumber of fan curves is:

(number of sensor and performance level combinations)×(number of fans)

The manager select the maximum speed from the speeds required by allsensors according to the fan curves at the current performance level asthe desired fan speed.

In one embodiment of the present invention, the fan curves aredetermined based on temperature measurements taken at different fanspeeds and at different performance levels.

In one embodiment of the present invention, software controls fan speedto manage system thermals. The goal of the software is to run the fan,as slowly and quietly as possible while maintaining devicespecification. Since a single thermal zone may have multiple hot spots,the software runs the fan at the slowest speed required to keep all hotspots in check, even if it means that one device is cooled more thanrequired in order to keep another device within the specification.

In one embodiment of the present invention, Active Thermal Managementsoftware is implemented in the kernel of an operating system. A thermalmanager processes input data, including sensed information (e.g.,temperature, CPU processing load, GPU processing load), detectedconditions (e.g., battery charging, lid closed, sleep mode) and userpreferences (e.g., prefer high graphics processing, prefer low noise) tooptimize and direct accordingly CPU and/or GPU processing levels,battery charging periods, fan speeds and drive performance. Thus, themanagement system integrates the inputs from sensors, user preferences,current tasks and other conditions like lid closed operation todetermine the optimum way to keep the temperature of the system within adesired range by increasing the cooling or decreasing the heat produced.In at least one embodiment, users of the data processing system canmanage their own thermal solutions through the thermal managementsoftware modules implemented on the data processing system (e.g., bysetting the user preferences).

FIG. 9 shows a software module diagram which shows software to managethe operation state of a data processing system according to oneembodiment of the present invention. In one embodiment of the presentinvention, a thermal management software system includes severalmodules, including sensor driver 907, thermal manager 901, and controldriver 903. Thermal manager 901 performs the central decision-making.Sensor driver 907 communicates with device driver 909 to obtain sensedinformation; and, control driver 903 communicates with device driver 905to adjust working states of one or more components (e.g., CPU, GPU orfan). In one embodiment of the present invention, device information 911from the device tree 913 and Boot ROM 915 are collected for theinstantiation of sensor driver 907 and control driver 903 during theinitialization period.

In one embodiment of the present invention, the thermal manager monitorsand controls the internal temperatures of the data processing system, onwhich the operating system is running, to prevent uncomfortable orunsafe temperatures. Certain parts, like the processor and graphicshardware, are more prone to overheating than others. Other components,like optical and hard drives, may fail due to excessive heat in thesystem. In order to monitor the temperatures of particularly hotcomponents, the thermal manager (901) obtains temperature informationabout them from sensor drivers (e.g., 907). Based on the temperatureinformation, the operating system instructs control drivers (e.g., 903)to take action to mitigate temperature increases as necessary in acoherent fashion.

In one embodiment of the present invention, thermal manager 901 containsa set of global rules that dictate how to manage the system: whether tomanage more heavily, stay the same, or manage less heavily. For example,a thermal manager may contain a Cooling Decider to determine the amountof cooling adjustment required based on the information obtained fromsensor driver 907, a priority decider to prioritize a list of controlsaccording to user preferences 921, system information 923, and a controldecider to adjust the controls according to the prioritized list ofcontrols to achieve the determined amount of cooling adjustment. Forexample, the Cooling Decider takes sensor value data and calculates howmuch it should turn the system cooling up or down. Specific rules thatrepresent additional criteria, such as user preferences andenvironmental factors, are used to prioritize the available controls foruse in the determination of control indices. The Priority Decidercreates a sorted list of controls ranked in the order they should bechanged according to these rules. The Cooling Decider passes thedesirable cooling change and any relevant information, such as thetarget thermal zone in which the cooling change is to be implemented, toa Control Decider, which implements the desirable cooling change. TheControl Decider takes the amount of cooling determined by the CoolingDecider and parcels out those changes to the controls in the orderdetermined by the Priority Decider. In one implementation, thisdecision-making happens at polled intervals.

In one embodiment of the present invention, thermal manager 901 employsFuzzy Logic and other data-driven algorithms to manage systemtemperature. For example, the Cooling Decider uses fuzzy logicprinciples and inference rules to determine the amount of coolingchange, instead of modeling the system mathematically, in which thefuzzy logic model is empirically derived and modified through testing orsimulation. An example of a rule is:

-   -   IF (temperature is hot) AND (temperature is increasing) THEN        (turn cooling up).

After a number of rules are evaluated, their results are combined togenerate a single result. Terms like (temperature is very hot),(temperature is increasing) or (turn cooling up a lot) can be definedfor better precision in control.

For example, a Cooling Decider may use the following rules.

-   -   1. IF (temperature is cold) THEN (turn cooling down)    -   2. IF (temperature is warm) THEN (do nothing)    -   3. IF (temperature is hot) THEN (turn cooling up)

FIG. 10 illustrates an example of a method to determine actions to beperformed using fuzzy logic in operating a data processing systemaccording to one embodiment of the present invention. A sensedtemperature may be classified non-exclusively as cold, warm and hot. Forexample, if the current temperature is a number of degrees below thedesired temperature, it can be classified mostly warm and a little cold.In FIG. 10, membership functions 1001, 1003 and 1005 define the levelsof truth for the classification of different temperatures. For example,curve 1001 represents the level of truth for different temperatures.When the different between the current temperature and the targettemperature, T−T_(o), is between −10° and 0°, the truth value increaseslinearly as the current temperature reduces (and decreases as thecurrent temperature increases). When the current temperature is 10°below the target temperature, the truth value of being cold is 1.0; and,when the current temperature is above the target temperature, the truthvalue of being cold is 0.0. Curve 1003 defines non-constant truth valuesof warm when the difference between the current temperature and thetarget temperature (|T−T_(o)|) is less than 10°; and, curve 1005 definesthe linear variation of truth values of hot when the current temperatureis within 10° above the target temperature. Thus, if a currenttemperature is 7.5°, the truth values for cold, warm and hot are 0, 0.25and 0.75 (1021, 1023 and 1025) respectively. The above rules for thecooling decider then lead (1011, 1013 and 1015) to the correspondingtruth values 0, 0.25 and 0.75 for the actions (turn cooling down), (donothing) and (turn cooling up) respectively, when the above inferencerules are used.

Membership graphs may be of complex shapes, such as Gaussian curves.Keeping them to triangles and trapezoids makes the calculations muchfaster.

FIGS. 11 and 12 illustrate an example defuzzification method to mergedifferent actions as one quantified action to operate a data processingsystem according to one embodiment of the present invention.

To merge the different results, the Cooling Decider goes through aprocess called “defuzzification” to get a single, crisp result in therange of ±20 units for the cooling, assuming the change of cooling isalways limited within 20 units. Consider an example in which the actionsof (turn cooling down), (do nothing) and (turn cooling up) have memberfunctions 1111, 1113 and 1115 respectfully, as shown in FIG. 11. In FIG.11, when cooling is turned down by no more than 10 units, the truthvalue of (turn cooling down) increases linearly as the unit of coolingdecreases; when cooling is turned up by no more than 10 units, the truthvalue of (turn cooling up) increases linearly as the unit of coolingincreases; and, when the change in cooling (|ΔC|) is less than 10 units,(Do nothing) has non-constant truth value.

Note that the shapes, ranges and slopes of member functions 1111, 113and 1115 for (turn cooling down), (do nothing) and (turn cooling up) arein general different from those for cold, warm and hot.

A commonly used method for “defuzzification”, called the Centroidalgorithm, first clips each consequent (result) by the degree of truthof its antecedent. Since (turn cooling down), (do nothing) and (turncooling up) have truth values 0, 0.25, 0.75 respectively, memberfunctions 1111, 1113 and 1115 are clipped to generate functions 1101,1103 and 1105 respectively.

Next, the clipped member functions are overlaid as in FIG. 12 tocalculate an average point where there is an equal area under the graphon each side of the average point. This is analogous to finding thecenter of mass in physics and is called the Centroid Method. Curve 1203in FIG. 12 corresponds to the portion of curve 1103 between points 1122and 1125 in FIG. 11; and, curve 1205 corresponds to the portion of curve1105 beyond point 1126. The average point 1211 in FIG. 12 is at 10.2unit. Thus, the Cooling Decider reaches the conclusion to turn upcooling for 10.2 units.

The priority decider and the control decider then determine how to turnup cooling for 10.2 units.

There are at least two kinds of data that are taken into account indeciding the priority ordering of controls: thermal zone and controltype. For example, a system might have two fans: a CPU near one fan, anda GPU near the other. In this example, there might be two thermal zones,one specifying the CPU and its associated fan, and the other specifyingthe GPU and its fan. However, the fans, CPU, and GPU are different typesof thermal controls: they create different side effects when inmodulating the temperatures. Therefore, they are associated by type ofcontrol (e.g., fan, processor, etc). Each type of control has certainknown properties, depending on the user's preferences or currentenvironmental factors.

The Priority Decider prioritizes the controls by type and zone into asingle priority queue for the Control Decider to adjust. For example,the list can be determined by user profiles, like “quiet” and “highperformance.” These profiles sort the controls by type. Within a type,the controls can be ordered by proximity to hot sensors: if a particularcontrol is closer to the hot sensor than another similarly-typedcontrol, it will have a higher priority. However, differently-typedcontrols are sorted according to profiles, not zones.

In one embodiment of the present invention, the Priority Decider isbased on an expert system, which takes in dynamic system information andapplies it to a list of rules to determine the priorities of thecontrols. The rules for the Priority Decider include systemenvironmental rules and user preference rules. A level of priorityindicates that the level of importance of the work of the device.Examples of system environmental rules include:

If intake temperature is high, decrease the fan's priority

If battery is charging and is above 90%, increase the battery charger'spriority

If CPU load is low, decrease the CPU's priority

If zone x is hot, use controls in zone x first

If graphics pipeline is busy, decrease the GPU's priority

If DVD is playing, decrease the CPU's priority

If burning CD/DVD, decrease the CPU's priority

If filesystem is busy, decrease the hard drive's priority

If sensors are too hot, don't burn CD/DVD

If CPU speed is too slow, can't burn CD/DVD

Examples of user preference rules include:

If “quiet,” decrease the fan's priority

If “high performance,” decrease the CPU's priority

If “high performance,” decrease the GPU's priority

The Control Decider adjusts the list of controls to achieve the requiredcooling change determined by the Cooling Decider, according to a list ofcontrols ranked by the Priority Decider in the order they should bechanged. In one embodiment, the cooling change that the Cooling Deciderprovides can be considered as the quantity of total control index changeto be made, with 0 being no cooling change, positive representing moreaggressive cooling, and negative representing less aggressive cooling.

For example, if the Cooling Decider determines to increase cooling for anumber of units, the control with the lowest priority is adjusted first(e.g., to reach the maximum cooling capacity if necessary) to providethe required cooling. If the required unit of cooling is not satisfiedafter the total cooling capacity of the control with the lowest priorityis exhausted, the control with the next lowest priority is adjusted.Thus, the list of controls is processed in the ascending order ofpriority for adjustment until the required units of cooling issatisfied.

Similarly, if the Cooling Decider determines to decrease cooling for anumber of units, the control with the highest priority is adjusted first(e.g., to reach the minimum cooling capacity and maximum performance) toaccommodate the decrease of cooling. If an extra number of unit ofcooling is available for decreasing after the cooling provided by thecontrol with the highest priority reaches the minimum, the control withthe next highest priority is adjusted. Thus, the list of controls isprocessed in the descending order of priority for adjustment until thegiven units of cooling is decreased.

In one embodiment of the present invention, the number of cooling unitsto be changed can be zero, with the changed priorities of the controls.To reflect the changes in priorities, the cooling units may be tradedbetween controls of different priorities to achieve better performance.For example, if high priority control A is providing more cooling thanlow priority control B, the high priority control A is adjusted forhigher performance but less cooling, while the low priority control B isadjusted to provide more cooling to compensate for the reduced coolingfrom control A.

In one embodiment of the present invention, the information aboutsensors and controls in the system (e.g., type, zone, and others),environmental parameters (e.g., high/low temperature thresholds),membership functions and inference rules required by the CoolingDecider, priority lists of controls needed for various user-affectedsettings, and others are collected (e.g., from device tree 913, Boot ROM915) during an initialization period (e.g., at startup) of themanagement system.

FIG. 13 shows a software module diagram which shows software to managethe operation state of a data processing system according to oneembodiment of the present invention. In one embodiment of the presentinvention, thermal manager manages system temperature through makingsimple decisions based on the temperature sensors and adjusting the CPUand GPU performance accordingly. In one embodiment, the thermal manageris a platform dependent driver (e.g., platform monitor 1321) thatresponds to events generated by sensor drivers (e.g., in response toexcessive thermal loading), power management requests (e.g., from powermanagement 1313), or configuration changes from the user to modify thebehavior of the system (e.g., by adjusting the working states of thecomponents of the data processing system through controls 1325, 1327 and1329). The thermal manager monitors the environmental factors (e.g.,using sensors 1323) and takes necessary action to prevent damage tomachine components or loss of user data.

In one embodiment of the present invention, state watcher 1311 allows auser to monitor sensors and observe the behavior of the thermal manager.This tool may be used to report all relevant data from the thermalmanagement system, as well as make runtime tweaks to parameters in thesystem. For example, the user can see what the system would do if itwere at a certain temperature or a certain state and set thresholds andpolling periods for the individual sensors.

In one implementation, platform monitor 1321 implements a state machine,which in response to the input, adjusts various system parameters inorder to adjust the level of cooling needed for the computer system. Theknowledge about the temperature being managed and what constitutes toohot versus too cold are coded in the platform monitor. In one embodimentof the present invention, the platform monitor determines the currentstate of the system from the information obtained from the sensordrivers and adjusts the thermal controls of the system to move thesystem from one state to another, if the current state is not adesirable one. For example, the states are determined from theinformation collected from sensors (e.g., temperatures sensors), systemconditions (e.g., lid open or closed), and preferences (e.g., “quiet” or“high performance”). There may also be different profiles forlid-closed, “quiet”, or other situations so that the monitor activelymanages the system to move between the states in the current profile.The platform monitor is platform specific and has detailed knowledge ofthe platform on which it is running. Using this knowledge, it collectsinformation from sensors in the system and takes appropriate actionsbased on the states of these sensors.

Sensor drivers provide environmental information about the computer. Aninstance of a sensor driver represents a specific environmental-sensingdevice, like a thermistor, an ambient light sensor, or a software sensorlike kernel load factor. For example, temperature sensors providetemperature information about the data processing system on which thesensor drivers are running. A sensor driver gets information about thesensor (e.g., thermal zone, type (such as temperature, light, battery,kernel load), thresholds, and others). Sensor drivers can be polled toget the current values and may support event notification to signalimportant threshold conditions.

A sensor driver (e.g., 907 or 1323) may apply to any sensor that detectsone aspect of the state of the system. For example, the user selecting“Reduced performance” in the Energy Saver preference panel is sensorinput. Whether the user has open or closed the clamshell is sensedinformation about the environment of the data processing system. Anyinput may trigger a response that dictates a state change of the system;and, the platform monitor is the centralized decision maker for takingactions to adjust the state of the system.

In one embodiment, each sensor registers itself with the manager (e.g.,platform monitor 1321 or thermal manager 901). For some sensors, such astemperature sensors, the manager sets a threshold that controls when thesensor driver notifies the manager. For example, a temperature sensormay be given an upper threshold and a lower threshold so that the sensordriver notifies the manager whenever the sensed temperature crosses oneof those thresholds. The sensor may be a smart one so that it triggersan interrupt when a threshold is crossed. Alternatively, the sensordriver may simulate this behavior by polling the sensor and onlynotifying the platform monitor when a threshold is crossed.

Based on the current state of the system, the manager may resetthresholds to control the behavior of the sensor. The thresholds can beset to control the responsiveness of the system and manage hysteresis.For example, when an upper threshold for a temperature is crossed, theupper and lower thresholds may be increased so that the currenttemperature is within the updated thresholds. The manager notices theshift in the temperate and takes actions to adjust heat removal (e.g.,increasing the speed of a fan) and/or heat generation (e.g., reducingthe performance and power consumption level of CPU or GPU) to bring thetemperature back down, if temperature is too high. Similarly, when thetemperature crosses the lower threshold, the upper and lower thresholdsmay be decreased so that the current temperature is within the updatedthresholds.

In one embodiment of the present invention, a sensor driver notifies themanager with a sensor value (e.g., scaled to the range 0-100) when aninteresting event occurs, or when the manager polls the sensor. Thesensor value is not necessarily the same as the raw data from thesensor; the sensor driver can take into account other prioritizedinformation from the sensor, e.g., how long a thermistor has read thetemperature. For example, the sensor driver can keep a history of itsdata and/or values. However, hysteresis or historical data is notgenerally required, since the manager can retain any data it needs.

Some sensors may be hardwired to cooling devices, like fans, that areoutside of the control of the Thermal Manager, but still notify thesystem when a cooling change has occurred.

In one embodiment of the present invention, controlling the fan speed isaccomplished by utilizing the hardware capabilities (e.g., using ADM1030from Analog Devices). ADM1030 fan controller contains an on-chipthermistor, support for a remote (off chip) thermistor, and isprogrammable to drive a variable speed fan. In one embodiment of thepresent invention, a generic temperature sensor driver is responsiblefor communicating sensor events to the platform monitor. In order toperform specific tasks, the device drivers are instructed to carry outdevice-dependent actions (e.g., reading the temperature from anADM1030). An instance of the generic driver has a low threshold and ahigh threshold for monitoring temperature, a specified polling periodfor periodically polling the temperature information, and otherattributes, such as name, value, temperature zone, type of sensor. Thethresholds may be modified and be disabled (e.g., by setting to apredetermined value) or enabled during runtime.

In one embodiment of the present invention, the generic temperaturesensor driver initializes itself and waits for the manager to be loadedduring start up. It then sends a message to the manager telling it whereit is. The manager then also registers as a client of the sensor driverto establish communication. The sensor driver sends a message to themanager when an interesting event occurs, such as a threshold that hasbeen hit or exceeded, or when the manager polls the sensor for thecurrent value. In one embodiment of the present invention, the generictemperature sensor driver is a generic liaison driver. It obtains theactual value for the sensor by talking to a specific device driver.

Control drivers are the actual effectors of the state change. Examplesof these include drivers that can change CPU multiplier, system busspeed, or GPU performance level. In one implementation, some of thesecontrols are linked into the manager (e.g., platform monitor).

In one embodiment of the present invention, an instance of a controldriver represents a device that is able to adjust its working state forenvironmental variation, including devices that are designed forremoving heat, such as fans, or devices that can adjust theirperformance to reduce heat generation. Control drivers may be visualizedas a dial for the output of the device they're controlling. In oneimplementation, a control driver accepts a value for the dial (e.g.,indicating a working state as a index value within 0-100, with highervalues representing most aggressive cooling and lower valuesrepresenting least aggressive cooling); and, the control driver alsosupports reporting its current index value and information about whetherit is at the maximum or minimum control level.

The devices that can have a corresponding control driver include: CPU,GPU, fan, backlight, battery charging, hard drive, optical drive, PCIcard, and others. CPU and GPU can be of a type of “performance hit” forwhich different working states correspond to different tradeoff inperformance and heat generation (or power consumption); fan can be of atype of “noisy” for which different working states correspond todifferent tradeoff in heat removal (and noise) and power consumption;backlight and battery charging can be of a type of “user impact” forwhich different working states correspond to different tradeoff in userexperience impact and power consumption.

The CPU clock is generated for some CPUs via an on-chip PLL thatselectively multiplies and divides the processor bus clock. However, theCPU clock PLL configuration of many microprocessors is only programmableduring a reset cycle. Thus, these CPU may be rebooted in order to changeclock speeds. The special reset cycle for changing clock may beaccomplished by programming a register in the memory controller forstate initialization and then sending a command to the PMU for a reset.

The latency for switching the CPU multiplier is very high when acomplete reset of the CPU is performed. In such an implementation,interrupts can be deferred for a period of time until the CPU reset iscomplete. This high interrupt latency can be evident to the end use inthe form of audio drop outs and/or pops. Thus, such a method for CPUspeed switch is generally not transparent without affecting the userexperience. In one embodiment of the present invention, such an approachfor CPU multiplier shift is used primarily to cope with excessivethermal stress.

To achieve a more transparent CPU speed change, the CPU clock is alteredthrough slewing (slowly changing) the bus clock. Some microprocessorsderive their clock from the system bus clock using an on-chip PLL. Inone embodiment of the present invention, the processor clock is changed,without a reset, through slowly changing the processor bus clock at arate slow enough to allow the on-chip PLL remain locked. One technicalchallenge is that changing the bus clock has the side effect of changingthe rate at which the decrementer register is modified. In oneembodiment of the present invention, several hardware components areused to implement CPU speed adjustment through slewing the bus clock,including a programmable clock source (e.g., Cypress CY28512) to supportslewing and a circuitry in the core logic to handle the time base driftproblem. Some CPUs have a signal called “TBEN” (Time Base ENable), whichcan be used to temporarily stop the processor from keeping track oftime. Custom logic inside the core logic modulates (changes) the TBENsignal in response to monitoring the master clocks. As a result, the CPUconcept of time is updated at a constant rate, even though the bus clockchanges with time.

In one embodiment of the present invention, a chip (e.g., CY28512) isused to take in a clock signal, apply some user-programmable multipliersto it, and output the clock signal at the resulting frequency. Theformula that the chip uses to calculate the output frequency is asfollows:

Output Frequency=Input frequency*(N/M)

The N and M values (along with some other options) are userprogrammable. For better usability, some chips (e.g., CY28512) accepttwo separate pairs of N and M values, and provides a way to switchbetween them. At initialization time, one pair is programmed with a setof “low” multipliers for the generation of a low output frequency, andthe other pair with a set of “high” multipliers for the generation of ahigh output frequency. While the system is running, a control driver cantoggle between them dynamically to effectively turn the clock frequencyup and down. To slew the frequency slowly enough so that the on-chip PLLof the CPU can follow the frequency change, a number of frequencychanges can be performed in small steps.

One advantage of lowering the clock frequency is that it allows thesystem to run at a lower voltage than normal to save power and reduceheat. Thus, after turning the clock down, the control driver can alsoturn the voltage down.

Some Graphics Processing Units (GPU) (e.g., the nVidia GeForce4Go(NV17M)) have a variety of power saving features designed (e.g., with amobile application in mind). Some of these features are automatic; and,others are manually settable. For example, NV17M allows the chip to turnoff unneeded areas to save power when they are not being used. Unusedblocks can power down, as they are not needed. For example, the driverto an unattached display can be powered off if a second display is notattached, or the MPEG decoder cell turned off if there is no need forit. The hardware clock saves power during tiny fractions of a secondwhen the graphics hardware is not being used to its fullest.

The configurable feature of the NV17M is the ability to modify the swapinterval. The swap interval defines the maximum number of frames the GPUrenders per second. It also defines the number of screen refreshesbetween redraws. The overall effect is a change in GPU workload, whichmay also change the workload of the CPU. For example, the GPU may beconfigured to work at swap interval of 0 without power saving, at swapinterval of 1 to generate frames at no faster than the display refreshrate, or at swap interval of 2 to generate frames at half the displayrefresh rate. In one embodiment of the present invention, theconfigurable swap interval is manipulated to limit temperature.

In one embodiment of the present invention, devices that act as sensorsor controls are described in the device tree with a set of propertiesadded to the nodes in the device tree, such as the type of sensor (i.e.temperature), a unique sensor ID, and the thermal zone of the sensor,location, polling period, and others. During the initialization period,control drivers and sensor drivers obtain this information from thedevice tree. For example, a control driver gets from the device treeinformation about the control, such as thermal zone, attributes (e.g.,performance hit, noisy, cooling device), type of control (e.g., fan,processor, etc). The manager uses this information in determining theinstantaneous index value for each control when new sensor valuesarrive. When an instantaneous index is received from the manager, thecontrol driver communicates with one or more device drivers to adjustthe control as necessary.

A state manager connects the sensor drivers and the control drivers tomanage the working states of the components to provide the desirableresult. For example, the levels of power and temperature dynamics may becontrol by the manager to best perform the current task within power andthermal constraints. The manager chooses the most relevant thermalcontrols to adjust, as well as how much to adjust. When some sensorsindicate that they are at a particularly low temperature, the polling ofthese sensors may be stopped after setting a threshold at which thesensors notify the system to restart polling them.

While the modules are functionally very independent, they may be inseparate drivers or combined drivers. For example, some hardware device,such as fan controllers, may a combined sensor and control driver. Ifthe only temperature of interest is the highest one of a number ofthermistors, they may be combined into a single sensor. Further, theCooling, Priority and Control Deciders may be just sets of routineswithin a single code module. From this description, a person skilled inthe art can envision many different combinations, modifications andvariations.

FIGS. 14-16 show methods to operate a data processing system accordingto embodiments of the present invention.

In FIG. 14, operation 1401 receives sensed information from a pluralityof physical sensors (e.g., thermistor, tachometer) instrumented in ahousing of a data processing system. Operation 1403 receives loadinformation on processing loads (e.g., CPU load). Operation 1405controls working states of a plurality of components of the dataprocessing system in the housing according to the sensed information andthe load information. The sensed information and the load informationcan be used to fine grain control the components to balance differentgoals, such as high performance, low power consumption, low acousticnoise, thermal constraints, user preferences, system design constraints,and others.

In FIG. 15, after operation 1501 collects sensed information (e.g., CPUload and processor temperatures) from a plurality of sensors of a dataprocessing system, operation 1503 determines a current state of the dataprocessing system based on the sensed information and user preferences.Operation 1505 determines a target state according to a predeterminedstate diagram. Operation 1507 selectively adjusts a set of controls tochange working states of components of the data processing system tomove the system from the current state to the target state. The statediagram may be pre-designed to specify control adjustments fortransition from one state to another to balance different goals.

FIG. 18 illustrates an example of a state diagram which shows a way tooperate a data processing system according to one embodiment of thepresent invention. In one embodiment of the present invention, the stateof the system is determined from the temperature and the position of thelid. When the temperature is in the normal range, the system is eitherin state 1817 if the lid is in the open position or in state 1827 if thelid is in the closed position. When the system is in state 1817 or 1827,the system is allowed to operate at a maximum performance level. Forexample, the cooling provided by the CPU is at the lowest level (e.g.,0%), allowing a fast dynamic speed and the maximum computationperformance; and, the cooling provided by the GPU is also at the lowestlevel (e.g., 0%). It is understood that the cooling provided by aprocessor (e.g., CPU or GPU) can be achieved through adjusting theworking state of the processor to reduce the power consumption and theassociated heat (e.g., through reducing the clock frequency and the corevoltage). However, in one embodiment, when the lid is closed, the PMU isforced to run at a slow speed. As the temperature T increases to passthresholds T^(a) _(lid-open), T^(b) _(lid-open), T^(c) _(lid-open), andT^(d) _(lid-open), the state of the system transits from state 1817(normal) to states 1815 (warm), 1813 (very warm), 1811 (hot), and 1803(very hot), if the lid is open. Similarly, as the temperature Tincreases to pass thresholds T^(a) _(lid-closed), T^(b) _(lid-closed),T^(c) _(lid-closed), and T^(d) _(lid-closed), the state of the systemtransits from state 1827 (normal, lid closed) to states 1825 (warm, lidclosed), 1823 (very warm, lid closed), 1821 (hot, lid closed), and 1803(very hot, lid closed), if the lid is closed. As the system goes intothe states of high temperatures, the working states of the components ofthe system may be adjusted to cool down the system. For example, when instate 1815 (1825, 1813, 1823, 1811 or 1821), the cooling of the CPU maybe adjusted to a higher level (e.g., 50%) to trade performance forcooling. For example, the CPU may be forced into a slow dynamic speed.Further, when in a very hot state (1803), the working state of the CPUmay be adjusted to provide maximum cooling (e.g., 100%). Similarly, whenin state 1813 (or 1823), the cooling of the GPU may be adjusted to ahigher level (e.g., 50%) to trade performance for cooling; and, when instate 1811 (1821, or 1803), the working state of the GPU may be adjustedto provide maximum cooling (e.g., 100%). To provide cooling from thegraphics system, DVD (or other optical drive) speed may be reduced. Whenthe temperature exceeds the safety threshold (e.g., T>T_(safety)), thesystem moves into a too hot state (1801), in which state PMU initiates arequest for forced sleep. If the system remains in the too hot state(e.g., for 4 minutes) without going to a sleep mode, PMU triggers aforced shutdown. Without changing the temperature range, the system maytransit between a lid closed state (e.g., 1821-1827) and a correspondinglid open state (e.g., 1811-1817) when the lid is opened or closed. Whenthe system cools down, working states of the components (e.g., CPU, GPU,DVD) can be adjusted for higher performance. In FIG. 18, differentthresholds are used for defining the transition between two states dueto the change in temperature. For example, when T>T^(a) _(lid-open), thesystem moves from state 1817 (normal) to state 1815 (warm); and, thesystem moves back to state 1817 (normal) from state 1815 (warm) onlywhen T<T^(a) _(lid-open)−T_(hysterisis). The difference in thethreshold, T_(hystensis), allows the system to be at one state when thetemperature fluctuates only slightly near one threshold, avoidingunnecessary actions in adjusting working states.

Although one embodiment of the present invention uses the state diagramillustrated in FIG. 18 and operations for cooling adjustment for variousstates described above with FIG. 18, it is understood that variousdifferent states of a state diagram can be defined and used for theoperation of a computer system. Further, different transition paths anddifferent adjustments of working states to more or less components(e.g., fan, memory chips, microprocessors, graphics chips, hard drives,optical drives, bridge chips, and others) for cooling and performancescan be defined for different state diagrams for operating a dataprocessing system. For example, in one implementation, when T exceedsT₀, cooling fan is activated (e.g., 33% duty cycle for ADM103x); whenT≤T₁, CPU can run at full speed; when T exceeds T₂, cooling fan runs atfull speed; when T exceeds T₃, CPU is forced into reduced speed mode;when T exceeds T₄, the system is forced to sleep, or to shutdown if notresponding to the request to sleep.

In FIG. 16, after operation 1601 collects sensed information (e.g., CPUload and processor temperatures) from a plurality of sensors of a dataprocessing system, operation 1603 determines an amount of cooling changebased on the sensed information. For example, fuzzy logic principles andinference rules can be used to determine the amount of cooling changesbased on the sensed information. Operation 1605 determines a prioritizedlist of controls to balance different goals (e.g., performance, powerconsumption, thermal constraint, acoustic noise, user preference, systemconstraint). For example, an expert system can be used to prioritize thelist according to a number of system rules and user preferences.Operation 1607 selectively adjusts a subset of the prioritized list ofcontrols to effect the amount of cooling change. The amount of coolingchange can be parceled out to one or more controls according to thepriorities of the controls.

FIG. 17 illustrates a method to parcel out cooling changes to a numberof controls according to one embodiment of the present invention.

If operation 1701 determines to increase cooling, operation 1711 firstincreases the speed of the cooling fan (e.g., up to the maximum fanspeed when necessary). If operation 1713 determines that more cooling isrequired, operation 1715 decreases the CPU clock frequency within theallowable frequency range; and, operation 1717 decreases the CPU corevoltage within the allowable frequency range. This adjustment to the CPUreduces the heat generation at the expense of computation performance.Thus, the thermal constraint can be maintained while running the systemat high computation performance.

If operation 1703 determines to decrease cooling, operation 1721increases the CPU core voltage within the allowable voltage range; and,operation 1723 increases the CPU clock frequency within the allowablefrequency range. This adjustment to the CPU increases the computationperformance of the CPU and heat generation, which corresponds todecrease cooling. If the CPU is at the maximum performance state andoperation 1725 determines less cooling is allowable, operation 1727decreases the speed of the cooling fan to reduce noise and powerconsumption.

If operation 1731 determines that the CPU and the fan can trade cooling,operation 1733 increases the CPU core voltage; operation 1735 increasesthe CPU clock frequency; and, operation 1737 increases the speed of thecooling fan. Thus, the CPU is allowed to run at high performance,generating more heat, which is removed by increased cooling from thefan.

Thus, in FIG. 17, cooling efforts are parceled out between the CPU andthe cooling fan to have a high performance within a thermal constraint.In general, the cooling efforts can be parceled out (e.g., by a ControlDecider) among a list of controls according to priorities (e.g., asdetermined by a Priority Decider), which reflect the balancing ofdifferent goals, such as performance, power consumption, thermalconstraint, acoustic noise, user preference, system constraint).

In the foregoing specification, the invention has been described withreference to specific exemplary embodiments thereof. It will be evidentthat various modifications may be made thereto without departing fromthe broader spirit and scope of the invention as set forth in thefollowing claims. The specification and drawings are, accordingly, to beregarded in an illustrative sense rather than a restrictive sense.

1. (canceled)
 2. A method to manage a data processing system enclosed inan housing of the data processing system, the method comprising:individually monitoring one or more temperatures in a plurality ofnon-isolated thermal zones of the housing, each thermal zone includingat least one heat-generating component and at least one componentadjustable to reduce heat in the corresponding zone; and adjustingworking states of the components in one or more of the plurality ofthermal zones according to a priority list of control settings thataffect temperature of at least one of the components, thereby limitingthe one or more temperatures to allowable levels.
 3. The method of claim2, wherein the heat-generating component of at least one zone and thecomponent adjustable to reduce heat in the at least one zone are thesame component, and performance of the component is reduced to reduceheat.
 4. The method of claim 2, wherein the at least one componentadjustable to reduce heat comprises a cooling fan; and the at least onecomponent that generates heat comprises an Integrated Circuit (IC) chip.5. The method of claim 4, further comprising: adjusting the cooling fanto run at a desired speed; and adjusting performance of the IC chip. 6.The method of claim 5, wherein adjusting performance of the IC chipcomprises: slowly adjusting a clock source and a voltage source to causethe IC chip running at a current clock frequency and a current corevoltage to run at a desired clock frequency and a desired core voltage.7. The method of claim 5, wherein adjusting performance of the IC chipcomprises: receiving load information about processing loads for the ICchip; transitioning between multiple power states for the IC chip basedon the load information and the monitored temperatures to reduce heatproduced by the data processing system.
 8. The method of claim 7,wherein the IC chip is a GPU and adjusting performance of the IC chipfurther comprises throttling thread scheduling based on the loadinformation.
 9. A data processing system enclosed in a housing, the dataprocessing system comprising: memory configured to store instructions; aprocessor coupled to the memory; and a plurality of temperature sensorscoupled to the processor and configured to individually monitor one ormore temperatures in a plurality of non-isolated thermal zones of thehousing, each thermal zone including at least one heat-generatingcomponent and at least one component adjustable to reduce heat in thecorresponding zone; wherein the processor is configured to adjustworking states of components in the plurality of non-isolated thermalzones according to a priority list of control settings that affecttemperature of at least one of the components, thereby limiting the oneor more temperatures to allowable levels.
 10. The data processing systemof claim 9, wherein the heat-generating component of at least one zoneand the component adjustable to reduce heat in the at least one zone arethe same component, and performance of the component is reduced toreduce heat.
 11. The data processing system of claim 9, wherein the atleast one component adjustable to reduce heat comprises a cooling fan;and the at least one component that generates heat comprises anIntegrated Circuit (IC) chip.
 12. The data processing system of claim11, wherein the processor is further configured to: adjust the coolingfan to run at a desired speed; and adjust performance of the IC chip.13. The data processing system of claim 12, further comprising: anadjustable clock source coupled to the IC chip; a voltage source coupledto the IC chip; and wherein to adjust performance of the IC chip, theprocessor is configured to slowly adjust the clock source and thevoltage source to cause the IC chip to run at a desired clock frequencyand a desired core voltage.
 14. The data processing system of claim 12,wherein to adjust performance of the IC chip, the processor isconfigured to: receive load information about processing loads for theIC chip; transition between multiple power states for the IC chip basedon the load information and the monitored temperatures to reduce heatproduced by the data processing system.
 15. A machine readable mediumcontaining executable computer program instructions that when executedby a data processing system cause said system to perform a method tomanage the data processing system enclosed in a housing of the dataprocessing system, the method comprising: individually monitoring one ormore temperatures in a plurality of non-isolated thermal zones of thehousing, each thermal zone including at least one heat-generatingcomponent and at least one component adjustable to reduce heat in thecorresponding zone; and adjusting working states of the components inone or more of the plurality of non-isolated thermal zones according toa priority list of control settings that affect temperature of at leastone of the components, thereby limiting the one or more temperatures toallowable levels.
 16. The machine readable medium of claim 15, whereinthe heat-generating component of at least one zone and the componentadjustable to reduce heat in the at least one zone are the samecomponent, and performance of the component is reduced to reduce heat.17. The machine readable medium of claim 15, wherein the at least onecomponent adjustable to reduce heat comprises a cooling fan; and the atleast one component that generates heat comprises an Integrated Circuit(IC) chip.
 18. The machine readable medium of claim 17, wherein themethod further comprises: adjusting the cooling fan to run at a desiredspeed; and adjusting performance of the IC chip.
 19. The machinereadable medium of claim 18, wherein adjusting performance of the ICchip comprises: slowly adjusting a clock source and a voltage source tocause the IC chip to run at a desired clock frequency and a desired corevoltage.
 20. The machine readable medium of claim 18, wherein adjustingperformance of the IC chip comprises: receiving load information aboutprocessing loads for the IC chip; transitioning between multiple powerstates for the IC chip based on the load information and the monitoredtemperatures to reduce heat produced by the data processing system. 21.A data processing system enclosed in a housing, the data processingsystem comprising: means for monitoring one or more temperatures in aplurality of non-isolated thermal zones of the housing, each thermalzone including at least one heat-generating component and at least onecomponent adjustable to reduce heat in the corresponding zone; and meansfor adjusting working states of the components in one or more of theplurality of thermal zones according to a priority list of controlsettings that affect temperature of at least one of the components,thereby limiting the one or more temperatures to allowable levels.